<script src="<?=base_url()?>/assets/mokui/js/jquery.min.js"></script>
<script>
    $.ajaxSetup({
        beforeSend: function (request) {
            request.setRequestHeader("<?=csrf_header()?>", "<?=csrf_hash()?>");
        },
        error: function (jqXHR, textStatus, errorThrown) {
            switch (jqXHR.status) {
                case (500):
                    layer.msg('服务器系统内部错误');
                    break;
                case (401):
                    layer.msg('未登录');
                    break;
                case (403):
                    layer.msg("无权限执行此操作");
                    break;
                case (408):
                    layer.msg("请求超时");
                    break;
                default:
                    layer.msg("未知服务端错误");
            }
        },
    });
</script>
<script src="<?=base_url()?>/assets/layui/layui.js"></script>